package com.example.springjpa.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

@RequestMapping("admin")
@Controller
public class AdminController {


    @GetMapping("getMessage")
    public ModelAndView getMessage() {
        ModelAndView modelAndView = new ModelAndView("index");
        modelAndView.addObject("message","欢迎进入，您的身份是管理员");
        return modelAndView;
    }


}
